//
//  APLoginButton.m
//  AqualPolo
//
//  Created by dong on 2024/5/1.
//

#import "APLoginButton.h"



@implementation APLoginButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        _contentView = [[UIView alloc] init];
        _contentView.userInteractionEnabled = false;
        [self addSubview:_contentView];
        [_contentView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self);
        }];
        
        _iconImageView = [[UIImageView alloc] init];
        [_contentView addSubview:_iconImageView];
        [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_contentView);
            make.centerY.equalTo(_contentView);
            make.size.mas_equalTo(CGSizeMake(24, 24));
        }];
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [LYFont fontWithSize:16 fontName:LYFontNamepfb];
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        [_contentView addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_iconImageView.mas_right).offset(13);
            make.top.bottom.right.equalTo(_contentView);
            make.right.equalTo(_contentView);
        }];
    }
    return self;
}

@end
